package com.cyf.common.core.common.entity;

import cn.hutool.core.util.RandomUtil;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author chenyifan
 * @create 2024-11-06 13:30
 */
@Data
public class Teacher {

    private String teacherName;
    private Integer age;
    private List<Children> childrenList;

    public static Teacher generateTeacher() {
        Teacher teacher = new Teacher();
        teacher.setTeacherName(RandomUtil.randomString(3));
        teacher.setAge(RandomUtil.randomInt(1, 100));
        List<Children> childrens = new ArrayList<>();
        for (int i = 0; i < 1; i++) {
            childrens.add(Children.generateChild());
        }
        teacher.setChildrenList(childrens);
        return teacher;
    }
}
